It said:

Turn the code that we wrote for insertionSort into an insertionSort function that works for any sized array.
Except that the insertionSort shown in that same chapter already does that. Have a look:
Code:
void sort (int array[], int size)
{
    for ( int i = 0; i < size; i++ )
    {
    int index = findSmallestRemainingElement( array, size, i );


    swap( array, i, index );
    }


}
The code of the findSmallestRemainingElement and swap functions were shown in the same few pages, but this already looks like it can handle an array of any size. At least, within the numbers the int type can handle.

I could make it handle more by having the array and size args be unsigned longs instead, but thats just too easy (and the chapter wasnt even about what the various types do).

Was this a mistake, or am I missing something, here?